package loengud.w06.tostring;


/**
 * {@link #toString()} polymorphismi demo.
 * 
 * @author A
 *
 */
public class Sqiduk {

	/**
	 * Igal sqidukil on reg. number.
	 */
	String regnumber;

	/**
	 * Program entry.
	 * 
	 * @param args cmd line args
	 */
	public static void main(String[] args) {

		// massiivi elemendid, ja konstruktori kasutamine
		Sqiduk s1 = new Auto();
		Sqiduk s2 = new Lennuk(2);
		
		// massivi tekitamine ja init.
		Sqiduk[] mass = new Sqiduk[] {s1, s2};
		
		// for-each
		for (Sqiduk s : mass) {
			System.out.println(s);
		}
	} // -main
}
